<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="text" id="text"> 
        <p id="show"></p>
    </div>
</body>
<script type="text/javascript">
    var obj = {};
    Object.defineProperty(obj, 'prop', {
        get: function() {
            return val;
        },
        set: function(newValue) {
            val = newValue;
            document.getElementById('text').value = newValue;
            document.getElementById('show').innerHTML = newValue;
        }
    });
    document.addEventListener('keyup', function(e){
        obj.prop = e.target.value;
    })
</script>
</html>